package com.example.demo_1106.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName shopping_cart
 */
@TableName(value ="shopping_cart")
@Data
public class ShoppingCart implements Serializable {
    /**
     * 
     */
    private String shoppingCartCode;

    /**
     * 
     */
    private Integer shoppingCartGoodsnum;

    /**
     * 
     */
    private Integer shoppingCartIsCheck;

    /**
     * 
     */
    private String shoppingCartContent;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ShoppingCart other = (ShoppingCart) that;
        return (this.getShoppingCartCode() == null ? other.getShoppingCartCode() == null : this.getShoppingCartCode().equals(other.getShoppingCartCode()))
            && (this.getShoppingCartGoodsnum() == null ? other.getShoppingCartGoodsnum() == null : this.getShoppingCartGoodsnum().equals(other.getShoppingCartGoodsnum()))
            && (this.getShoppingCartIsCheck() == null ? other.getShoppingCartIsCheck() == null : this.getShoppingCartIsCheck().equals(other.getShoppingCartIsCheck()))
            && (this.getShoppingCartContent() == null ? other.getShoppingCartContent() == null : this.getShoppingCartContent().equals(other.getShoppingCartContent()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getShoppingCartCode() == null) ? 0 : getShoppingCartCode().hashCode());
        result = prime * result + ((getShoppingCartGoodsnum() == null) ? 0 : getShoppingCartGoodsnum().hashCode());
        result = prime * result + ((getShoppingCartIsCheck() == null) ? 0 : getShoppingCartIsCheck().hashCode());
        result = prime * result + ((getShoppingCartContent() == null) ? 0 : getShoppingCartContent().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", shoppingCartCode=").append(shoppingCartCode);
        sb.append(", shoppingCartGoodsnum=").append(shoppingCartGoodsnum);
        sb.append(", shoppingCartIsCheck=").append(shoppingCartIsCheck);
        sb.append(", shoppingCartContent=").append(shoppingCartContent);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}